package com.example.singleon;

/**
 * 静态内部类实现，线程安全
 */
public class Singleton3 {
    private Singleton3(){}
    private static class Instance{
        private static final Singleton3 singleton3 = new Singleton3();
    }
    public static Singleton3 getInstance(){
        return Instance.singleton3;
    }
}
